#include <cstdio>
#include <vector>
#include <algorithm>
#include <memory>
#include <bits/stl_function.h>

class Employee{
public:
	int id;
	void dosomething();
};

void Employee::dosomething(){
	printf("%d working \n",id);
}

int main(){
	using std::vector;
	vector<Employee> vec;
	Employee e;
	e.id=1;
	vec.push_back(e);
	e.id=2;
	vec.push_back(e);
	
	e.id=123;
	
	std::for_each(vec.begin(),vec.end(),std::mem_fun_ref(&Employee::dosomething));
	
	return 0;
}